import { getCityAll } from "@/service";
import { defineStore } from "pinia";

const cityStore=defineStore('city',{
   state:()=>({
    allCities:{},
    currentCity:{cityName:'西安'}
   }),
    actions:{
        async fetchAllCitiesData(){
            const res=await getCityAll()
            this.allCities=res.data
        }
    }
})

export default cityStore